/*
** transfert.c for  in /home/gomes_m//my-project-a-moi/client/src
** 
** Made by mickael gomes
** Login   <gomes_m@epitech.net>
** 
** Started on  Tue Jul 30 17:53:26 2013 mickael gomes
** Last update Wed Jul 31 00:04:12 2013 mickael gomes
*/

#include			<sys/types.h>
#include			<sys/stat.h>
#include			<fcntl.h>
#include			<unistd.h>
#include			"struct.h"
#include			"prototypes.h"

void				transfert(t_cmd *cmd, t_socket *socket)
{
  int				fd;

  (void)socket;
  if ((fd = open(cmd->arguments, O_WRONLY | O_CREAT)) == -1)
    my_putstr(2, "Open has failed.\n", 0);
  else
    xwrite(fd, cmd->response, my_strlen(cmd->response));
}
